package bairui.international.weixin.portal.miniapp.controller.sys.sys;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.output.FomatOutput;

import bairui.international.model.domain.jpa.TB_SystemConfig;
import bairui.international.service.Service_SystemConfig;
import lombok.Getter;

/**
 *
 * 获取
 *
 * @generated
 * 
 * @see STest_C_Sys_Get_Get 测试
 *
 */
@Controller
public class C_Sys_Get_Get
 extends SC_Sys_Get_Get 
{
	
	@Autowired private Service_SystemConfig service_SystemConfig;
	
	/**
	 * Get请求
	 */
	@Action(Get.class)
	@GetMapping(Get.RequestMappingValue)
	public @FomatOutput @ResponseBody Object get(
		ModelMap map, HttpServletRequest request
	) throws Exception {
		TB_SystemConfig bean = service_SystemConfig.findFirst();
		//
		return new Output(bean);
	}

	public static class Output {
		private @Getter Double rechargeMinAmount;
		private @Getter Double withdrawMinAmount;

		public Output(TB_SystemConfig bean) {
			this.rechargeMinAmount = bean.getRechargeMinAmount();
			this.withdrawMinAmount = bean.getWithdrawMinAmount();
		}
	}

}
